﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="loading">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<meta name="viewport" content="width=device-width, initial-scale=0.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name="keywords" content="新创社" />
	<meta name="description" content="新创社会创新">
	<meta name="author" content="新创社" />
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta content="telephone=no" name="format-detection">
	<title>新创社会创新</title>
    <script type="text/javascript" src="js/jquery.min.js"></script> 
    <script src="laydate/laydate.js"></script>
    <script type="text/javascript" src="js/jquery.cityselect.js"></script>
    <script src="js/project_re.js"></script> 
	<link rel="stylesheet" type="text/css" href="../css/indexstyle.css" />
    <link rel="stylesheet" type="text/css" href="css/project_re_style.css" />
	<link rel="apple-touch-icon-precomposed" href="../img/default/defaultshare.jpg">
	<link href="../img/icons/favicon.ico" rel="shortcut icon" type="image/x-icon">
    <script type="text/javascript">
$(function(){
	$("#city_1").citySelect({
		nodata:"none",
		required:false
	}); 
});
</script>

</head>
<body>
		<?php
			require_once("../connectMysql/connetMysql.class.php");
			$db=new connetMysql;
			$con=$db->getConnect();
			session_start();
			if(empty($_SESSION["mb"]) && empty($_SESSION["pwd"]))
				echo "<script>window.location.href='../login/login.html'</script>";	
				
			$projectid=$_GET['projectid'];
			if(empty($projectid))
			{
				$uptype=0;
			}
			else
			{
				$uptype=1;
			}
			
			if(!empty($projectid))
			{
				$chkmb_sql="SELECT ProjectId FROM project WHERE userid=(SELECT UserId FROM user WHERE UserPhone=".$_SESSION['mb'].")"; 
				mysqli_query($con,$chkmb_sql);
				$num=mysqli_affected_rows($con);
				if($num==0)
				{
					echo "<script>alert('禁止访问！');</script>";
					echo "<script>window.location.href='project.php'</script>";
				}
				else
				{
					
					$getproinfo="SELECT ProName,ProDescri,ProContent,ProNeedRec FROM project WHERE ProjectId=".$projectid;
					$result=mysqli_query($con,$getproinfo);
					$row = mysqli_fetch_assoc($result);
				}
				$db->clossConnet();				
			}
		?>
		<div class="head">
			<!-- Header -->
			<div id="header">
				<a id="menu" href="#menu"></a>
				<span id="Logo" class="svg">
					<img src="../img/icons/logo.png" />
				</span>
				 <a class="backBtn" onclick='javascript:history.back()'>返回</a>
			</div>
            <!--End Header-->
			<div class="subHeader"><i class="i-home i-small"></i>项目发布!</div>
			
		</div>
        <div class="main"  id="wrapper">
        	
        	<form id="reform" method="post" action="projectrelease.php">  
            	<input type="hidden" name="uptype" value="<?php echo $uptype;?>"/>
                <input type="hidden" name="projectid" value="<?php echo $projectid;?>"/>
            	<h3>项目信息</h3>
             	<table class="activity-list hot">
                	<tr>
                    	<td>项目名称</td>
                        <td><input type="text" id="title" class="require" name="title" placeholder="填写项目名称"
                        <?php if(!empty($projectid)) echo "value=\"".$row['ProName']."\"" ?>></td>
                        
                    </tr>
                    <tr>
                    	<td>项目时间</td>
                        <td>
                       <input placeholder="请输入项目开始日期" id="ptime" name="ptime" class="laydate-icon" onclick="laydate()">
						
						</td>
                        
                   </tr>
                   <tr>
                    	<td>项目方向</td>
                        <td>
                         <select id="ptype" name="ptype" class="require w6">
                                <option value="0">选择类型</option>
                                <option value="1">社交</option>
                                <option value="2">工具</option>
                                <option value="3">游戏</option>
                                <option value="4">教育</option>
                                <option value="5">媒体</option>
                                <option value="6">旅游</option>
                                <option value="7">金融</option>
                                <option value="8">硬件</option>
                                <option value="9">体育</option>
                                <option value="10">O2O</option>
                                <option value="11">新农业</option>
                                
                                <option value="12">电子商务</option>
                                <option value="13">移动应用</option>
                                <option value="14">企业服务</option>
                                <option value="15">文化艺术</option>
                                <option value="16">营销广告</option>
                                <option value="17">视频娱乐</option>
                                <option value="18">健康医疗</option>
                                <option value="19">搜索安全</option>
                                <option value="20">创业服务</option>
                                <option value="21">站长工具</option>
                                <option value="22">企业服务</option>
                                <option value="23">酒店服务</option>
                                <option value="24">其他应用</option>                    
                            </select>
                         </td>
                        
                   </tr>
                     <tr>
                    	<td>项目状态</td>
                        <td>
                         <select id="pstatus" name="pstatus" class="require w6" >
                                <option value="0">选择状态</option>
                                <option value="1">有个好想法</option>
                                <option value="2">寻找小伙伴</option>
                                <option value="3">产品研发中</option>
                                <option value="4">产品运营中</option>
                                                 
                            </select>
                         </td>
                        
                   </tr>
                   
                   <tr>
                    	<td>项目人数</td>
                        <td>
                        	<select name="psum" id="psum" class="require w6">
                        		<option value="0">请选择</option>
                        		<option value="1">1人</option>
                                <option value="2">2~5人</option>
                                <option value="6">6~10人</option>
                                <option value="11">11~20人</option>
                                <option value="21">21~50人</option>
                                <option value="51">51~100人</option>
                                <option value="100">100人以上</option>             
                            </select>
                       
                        </td>
                        
                   </tr>
                    <tr>
                    	<td>项目地区</td>
                        <td>
                           <div id="city_1">
                               <select id="prov" name="prov" class="prov require w6"></select> 
                               <select id="city" name="city" class="city require w6" disabled="disabled"></select>
                           </div>       
                        </td>
                        
                   </tr>
                    <tr>
                    	<td>需求资源</td>
                        <td>
                        	<input type="text" id="needrec" name="needrec" placeholder="请填写您想要的" class="require"
                            <?php if(!empty($projectid)) echo "value=\"".$row['ProNeedRec']."\"" ?>>
                        </td>
                        
                   </tr>
                    <tr>
                    	<td>项目简介</td>
                        <td>
                        	<input type="text" id="pdescri" name="pdescri" placeholder="一句话描述您的项目" class="require"
                            <?php if(!empty($projectid)) echo "value=\"".$row['ProDescri']."\"" ?>>
                        </td>
                        
                   </tr>
                </table>
                <div class="other clearfix">
                    <p>项目介绍</p>
                    <textarea rows="5" name="intro" id="intro" class="mt require" placeholder="项目详情介绍">
                    <?php 
						if(!empty($projectid)) 
						{
							echo $row['ProContent']; 

						}
					
					?></textarea>
                    <button type="button" class="cks-btn mt fr" id="submit-btn">立即发布</button>
                </div>
           </form>
        </div>

		

</body>

</html>